package br.com.news.ws;

import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;

import br.com.news.utils.database.beans.FonteBean;

@Path("/fontes")
public class FonteWs extends GenericWs<FonteBean>{
	
	@POST
	@Path("/buscapornome")
	@Produces("application/json")
	@Consumes("application/json")
	public String buscaPorNome(String json){
		FonteBean fonteBean = (FonteBean) convertFromJson(json, new FonteBean());
		return toJson(RmiFactory.getFonteService().buscaPorNome(fonteBean.getDescricao()));
	}
	
}
